<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script src="js/ajax.js"></script>
    <style>
        #app img{
            width: 150px;
        }
    </style>
</head>
<body>
    <div id="app"></div>
    <script>
       
        var id = location.search.split("=")[1];
        var banner = `http://47.108.197.28:3000/playlist/detail?id=${id}`;
        $ajax({
            url:banner,
            success:res=>{
                console.log(res)
                var {name,coverImgUrl} = res.playlist;
                console.log(name)
                var template = `
                <div>
                        <img src = "${coverImgUrl}">
                        <p>${name}</p>             
                </div>
                `
                $("#app").append(template)
            }
        })
    </script>
</body>
</html>